<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
		<title>Untitled Document</title>
		<script type="text/javascript">

//- Prototype			
/*Object.extend = function(destination, source) {
  for (var property in source) {
    destination[property] = source[property];
  }
  return destination;
};

Object.extend(String, {
    interpret: function(value){
        return value === null ? '' : String(value);
    }
});
Object.extend(String.prototype, {
    startsWith: function(pattern){
        return this.indexOf(pattern) === 0;
    },
    endsWith: function(pattern){
        var d = this.length - pattern.length;
        return d >= 0 && this.lastIndexOf(pattern) === d;
    },
    empty: function(){
        return this === '';
    },
    blank: function(){
        return (/^\s*$/.test(this));
    }
});
Object.extend(Object, {
    inspect: function(object){
        try {
            if (object === undefined) {
                return 'undefined';
            }
            if (object === null) {
                return 'null';
            }
            return object.inspect ? object.inspect() : object.toString();
        } 
        catch (e) {
            if (e instanceof RangeError) {
                return '...';
            }
            throw e;
        }
    },
    keys: function(object){
        var keys = [];
        for (var property in object) {
            keys.push(property);
        }
        return keys;
    },
    values: function(object){
        var values = [];
        for (var property in object) {
            values.push(object[property]);
        }
        
        return values;
    },
    clone: function(object){
        return Object.extend({}, object);
    }
});*/
//- Shorthand
(function(){
	var S=String, Sp=S.prototype, O=Object, A=Array, Ap=A.prototype;
    S.interpret= function(value){
        return value === null ? '' : String(value);
    };
    /**
     * Checks if the string starts with pattern.
     * @alias String.prototype.startsWith
     * @param {String} pattern	Pattern to search for.
     * @return {Boolean}	Returns true if the string starts with a pattern.
     */
    Sp.startsWith = function(pattern){
        return this.indexOf(pattern) === 0;
    };
    Sp.endsWith= function(pattern){
        var d = this.length - pattern.length;
        return d >= 0 && this.lastIndexOf(pattern) === d;
    };
    Sp.empty= function(){
        return this === '';
    };
    Sp.blank= function(){
        return (/^\s*$/.test(this));
    };	
    O.inspect= function(object){
        try {
            if (object === undefined) {
                return 'undefined';
            }
            if (object === null) {
                return 'null';
            }
            return object.inspect ? object.inspect() : object.toString();
        } 
        catch (e) {
            if (e instanceof RangeError) {
                return '...';
            }
            throw e;
        }
    };
    O.keys= function(object){
        var keys = [];
        for (var property in object) {
            keys.push(property);
        }
        return keys;
    };
    O.values= function(object){
        var values = [];
        for (var property in object) {
            values.push(object[property]);
        }
        
        return values;
    };
    O.clone= function(object){
        return Object.extend({}, object);
    };	
    A.from = function(object){
        if (!iterable) {
            return [];
        }
        if (iterable.toArray) {
            return iterable.toArray();
        }
        else {
            var results = [];
            for (var i = 0, length = iterable.length; i < length; i++) {
                results.push(iterable[i]);
            }
            return results;
        }
    };
	Ap.some=function(){
		
	};
	Ap.all=function(){
		
	};
})();


		</script>
	</head>
	<body>
	</body>
</html>
